using System;
using System.Data;
using System.Collections;
using System.Data.SqlClient;
using PHSRAG.Insight21.InsightUtilities;
using System.Text;

using BO				= PHSRAG.Insight21.BusinessObjects;
using DataAccess		= PHSRAG.Utility.DataAccess;
using ICachePolicy		= PHSRAG.Insight21.Policy.ICachePolicy;
using SearchCriteria	= PHSRAG.Insight21.SearchContext.SearchCriteria;

namespace PHSRAG.Insight21.Purchasing
{
	/// <summary>
	/// Transaction class inherits from 
	/// Business Object and provides the abstract methods for Seach, Sorting 
	/// and loading the list of transaction objects.
	/// </summary>
	public abstract class Transactions:  BO.BusinessObject
	{
		#region Constructor
		/// <summary>
		/// Intilize the base class, pass cachepolicy to set the state management for business object
		/// </summary>
		/// <param name="cachePolicy">cache policy used to maintain the state of business object</param>
		public Transactions(ICachePolicy cachePolicy) : base(cachePolicy)
		{}
		#endregion

		#region Public Properties 
		/// <summary>Get the total number of Transactions.</summary>
		public abstract int Count	{ get;}
		/// <summary>Get the SortColumn name used for Sorting </summary>
		public abstract string SortColumn { get; set;}
		/// <summary>Gets the sort order, it can be asce or desc </summary>
		public abstract bool SortAscending	{ get; set;}
		#endregion

		#region Abstract Methods

		/// <summary>
		/// Get the list of transaction objects bound by a start and end index. 
		/// </summary>
		/// <param name="startIndex">Index within the transaction summary list to begin at</param>
		/// <param name="count">Total number of transaction objects to load</param>
		/// <returns>The list of transaction objects</returns>
		public abstract ArrayList GetPurchasingTransactionList(int startIndex, int count);
				
		/// <summary>
		/// Sort the list of properties in Object by the speicified column.
		/// </summary>
		/// <param name="columnName">Column to sort by</param>
		public abstract void Sort(string columnName);
	
		#endregion
	}
}
// --- EOF ---